﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;

namespace IHISCETeim.Web.MachineSys.MacModel
{
    public partial class ODailyList : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看, Permission.修改, Permission.新增, Permission.删除 };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "ODailyList";
            }
        }
        #region 属性 (查询条件)


        protected string UserName
        {
            get
            {
                return GetRequestValue<string>("UserName");

            }
        }

        protected string SerialNumber
        {
            get
            {
                return GetRequestValue<string>("SerialNumber");
            }
        }

        protected string GongWei
        {
            get
            {
                return GetRequestValue<string>("GongWei");
            }
        }

        protected override string orderField
        {
            get
            {
                return string.IsNullOrEmpty(base.orderField) ? "DailyId" : base.orderField;
            }
        }
        protected override string orderDirection
        {
            get
            {
                return string.IsNullOrEmpty(base.orderDirection) ? "Desc" : base.orderDirection;
            }
        }
        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
            this.AddLog(Permission.查看, UserName+SerialNumber+GongWei);
        }

        protected void DataBind()
        {

            this.rpMenu.DataSource = ODailyController.GetPagination(UserName, SerialNumber, GongWei, pageNum, numPerPage, SQLSort, ref TotalCount);
            this.rpMenu.DataBind();
        }
    }
}